﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Item.Master" AutoEventWireup="true"
    CodeBehind="UserItem.aspx.cs" Inherits="SGDemo.Permission.UserItem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">
    <script type="text/javascript" src="UserItem.js" ></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpBody" runat="server">
   <div class="ui-menu">
        <uc:Menu ID="menu1" runat="server" DataFile="../Views/Permission/Menu/UserItem.xml"
            PageCode="UserItem" />
    </div>
    <div class="ui-wrapper">
        <div class="ui-hidden">
            <dx:ASPxLabel ID="lblKeyid" ClientInstanceName="lblKeyid" runat="server" />
            <dx:ASPxLabel ID="lblDeptKeyid" ClientInstanceName="lblDeptKeyid" runat="server" />
            <dx:ASPxLabel ID="lblDeptCode" ClientInstanceName="lblDeptCode" runat="server" />
             <%--数据源控件--%>
            <asp:ObjectDataSource ID="odsList" runat="server" TypeName="SGDemo.Permission.DeptDataSource"
                SelectMethod="FilteredGetAll">
                <SelectParameters>
                  
                    <asp:Parameter Name="filterConditions" Type="String" DefaultValue=" "/>
                </SelectParameters>
            </asp:ObjectDataSource>
        </div>
        <ul class="ui-list">
            <li>
                <dx:ASPxLabel ID="lbl" runat="server" Text="用户名称：" ForeColor="Red" AssociatedControlID="txtUsername" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtUsername" ClientInstanceName="txtUsername" runat="server"
                    Width="120px">
                    <ValidationSettings>
                        <RequiredField IsRequired="True" ErrorText="用户名称必须填写" />
                        <RegularExpression ValidationExpression=".{2,}" ErrorText="帐号名称至少填写两个字符" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblPassword" runat="server" Text="密 码：" ForeColor="Red" AssociatedControlID="txtPassword" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtPassword" ClientInstanceName="txtPassword" runat="server"
                    Width="120px" Password="true">
                    <ValidationSettings>
                        <RequiredField IsRequired="True" ErrorText="帐号密码必须填写" />
                        <RegularExpression ValidationExpression=".{6,}" ErrorText="帐号密码至少填写六个字符" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblRealname" runat="server" Text="真实姓名：" ForeColor="Red" AssociatedControlID="txtRealname" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtRealname" ClientInstanceName="txtRealname" runat="server"
                    Width="120px">
                </dx:ASPxTextBox>
            </li>
            <li>
               <dx:ASPxLabel ID="lblDeptName" ClientInstanceName="lblDeptName" runat="server" Text="所属部门：" ForeColor="#5494EA" BackColor="Transparent" >
                    <ClientSideEvents Click="doOpenWin" />
               </dx:ASPxLabel>
            </li>
            <li>
                <dx:ASPxTextBox ID="txtDeptname" ClientInstanceName="txtDeptname" runat="server"
                    Width="120px">
                    <ValidationSettings>
                        <RequiredField IsRequired="True" ErrorText="所属部门必须填写" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
        </ul>
        <ul class="ui-list">
            <li>
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="邮箱地址：" AssociatedControlID="txtEmail" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtEmail" ClientInstanceName="txtEmail" runat="server" Width="120px">
                    <ValidationSettings>
                        <RegularExpression ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            ErrorText="无效的邮箱地址格式" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblPhone" runat="server" Text="手机号码：" ForeColor="Red" AssociatedControlID="txtMobilePhone" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtMobilePhone" ClientInstanceName="txtMobilePhone" runat="server"
                    Width="120px">
                    <ValidationSettings>
                         <RequiredField IsRequired="True" ErrorText="手机号码必须填写" />
                        <RegularExpression ValidationExpression="((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)"
                            ErrorText="无效的手机号码格式" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblEmail2" runat="server" Text="是否审核：" />
            </li>
            <li>
                <dx:ASPxRadioButtonList ID="rblIsApproved" ClientInstanceName="rblIsApproved" runat="server"
                    RepeatDirection="Horizontal" RepeatLayout="Table" Width="120">
                    <Items>
                        <dx:ListEditItem Text="是" Value="true" />
                        <dx:ListEditItem Text="否" Value="false" />
                    </Items>
                    <Paddings Padding="0" />
                </dx:ASPxRadioButtonList>
            </li>
            <li>
                <dx:ASPxLabel ID="ASPxLabel12" runat="server" Text="是否禁用：" />
            </li>
            <li>
                <dx:ASPxRadioButtonList ID="rblIsLockedOut" ClientInstanceName="rblIsLockedOut" runat="server"
                    RepeatDirection="Horizontal" RepeatLayout="Table" Width="120">
                    <Items>
                        <dx:ListEditItem Text="是" Value="true" />
                        <dx:ListEditItem Text="否" Value="false" />
                    </Items>
                    <Paddings Padding="0" />
                </dx:ASPxRadioButtonList>
            </li>
        </ul>
        <ul class="ui-list ">
            <li>
                <dx:ASPxLabel ID="lblPasswordQuestion" runat="server" Text="密保问题："  ForeColor="Red" AssociatedControlID="txtPasswordQuestion" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtPasswordQuestion" ClientInstanceName="txtPasswordQuestion"
                    runat="server" Width="120px">
                    <ValidationSettings>
                        <RequiredField IsRequired="True" ErrorText="密保问题必须填写" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblPasswordAnswer" runat="server" Text="密保答案：" ForeColor="Red" AssociatedControlID="txtPasswordAnswer" />
            </li>
            <li>
                <dx:ASPxTextBox ID="txtPasswordAnswer" ClientInstanceName="txtPasswordAnswer" runat="server"
                    Width="120px">
                    <ValidationSettings>
                        <RequiredField IsRequired="True" ErrorText="密保答案必须填写" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </li>
            <li>
                <dx:ASPxLabel ID="lblComment" runat="server" Text="备注：" AssociatedControlID="txtComment" />
            </li>
            <li style="width: 340px;">
                <dx:ASPxTextBox ID="txtComment" ClientInstanceName="txtComment" runat="server" Width="340px">
                </dx:ASPxTextBox>
            </li>
        </ul>
        <ul class="ui-list "id="diss">
          <li> <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="拥有的部门：" AssociatedControlID="txtComment" /></li>
            <li>
                <dx:ASPxListBox ID="lbdept" runat="server" SelectionMode="Single" Width="340"
                    Height="210px" ClientInstanceName="lbdept"  ValueField="Keyid" OnCallback="dept_OnCallback"
                    ValueType="System.String" >
                    <Columns>
                        <dx:ListBoxColumn FieldName="DeptName" Caption="部门名称" Width="60px" />
                        <dx:ListBoxColumn FieldName="DeptCode" Caption="部门编号" Width="60px" />
                    </Columns>
                </dx:ASPxListBox>
            </li>
            <li > <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="拥有的岗位：" AssociatedControlID="txtComment" /></li>
            <li>
                <dx:ASPxListBox ID="lbrole" runat="server" SelectionMode="Single" Width="340"
                    Height="210px" ClientInstanceName="lbrole"  ValueField="Keyid" OnCallback="role_OnCallback"
                    ValueType="System.String" >
                    <Columns>
                        <dx:ListBoxColumn FieldName="RoleName" Caption="岗位名称" Width="60px" />
                        <dx:ListBoxColumn FieldName="RoleCode" Caption="岗位编号" Width="60px" />
                    </Columns>
                </dx:ASPxListBox>
            </li>
        </ul>
        <div class="ui-validation">
            <dx:ASPxValidationSummary ID="vsSummary" runat="server" RenderMode="BulletedList"
                Width="100%" ClientInstanceName="validationSummary" ShowErrorsInEditors="false"
                ShowErrorAsLink="true">
            </dx:ASPxValidationSummary>
        </div>
        <ul class="sl-floatcenter clearfix ui-btn-bottom ui-btn-saveforadd">
            <li class="sl-floatcenter-item">
                <dx:ASPxButton ID="btnSaveToAdd" ClientInstanceName="btnSaveToAdd" runat="server"
                    Text="保 存" AutoPostBack="false">
                    <ClientSideEvents Click="doSaveForAdd" />
                </dx:ASPxButton>
            </li>
            <li class="sl-floatcenter-item">
                <dx:ASPxButton ID="btnSaveAndContinueToAdd" ClientInstanceName="btnSaveAndContinueToAdd"
                    runat="server" Text="保存完继续新增" AutoPostBack="false">
                    <ClientSideEvents Click="doSaveAndContinueToAdd" />
                </dx:ASPxButton>
            </li>
            <li class="sl-floatcenter-item">
                <dx:ASPxButton ID="btnResetForAdd" ClientInstanceName="btnResetForAdd" runat="server"
                    Text="重 置" AutoPostBack="false">
                    <ClientSideEvents Click="doResetForAdd" />
                </dx:ASPxButton>
            </li>
        </ul>
        <ul class="sl-floatcenter clearfix ui-btn-bottom ui-btn-saveforedit">
            <li class="sl-floatcenter-item">
                <dx:ASPxButton ID="btnSaveToEdit" ClientInstanceName="btnSaveToEdit" runat="server"
                    Text="保 存" AutoPostBack="false">
                    <ClientSideEvents Click="doSaveForEdit" />
                </dx:ASPxButton>
            </li>
            <li class="sl-floatcenter-item">
                <dx:ASPxButton ID="btnCancelForEdit" ClientInstanceName="btnCancelForEdit" runat="server"
                    Text="取 消" AutoPostBack="false">
                    <ClientSideEvents Click="doCancelForEdit" />
                </dx:ASPxButton>
            </li>
        </ul>
    </div>
    <div class="ui-state">
        <ul>
            <li>创建人： </li>
            <li>
                <dx:ASPxLabel ID="lblCreateName" ClientInstanceName="lblCreateName" runat="server" />
            </li>
            <li class="ui-state-seperator">| </li>
            <li>创建日期： </li>
            <li>
                <dx:ASPxLabel ID="lblCreateDate" ClientInstanceName="lblCreateDate" runat="server" />
            </li>
            <li class="ui-state-seperator">| </li>
            <li>编辑人： </li>
            <li>
                <dx:ASPxLabel ID="lblModifyName" ClientInstanceName="lblModifyName" runat="server" />
            </li>
            <li class="ui-state-seperator">| </li>
            <li>编辑日期： </li>
            <li>
                <dx:ASPxLabel ID="lblModifyDate" ClientInstanceName="lblModifyDate" runat="server" />
            </li>
        </ul>
    </div>
</asp:Content>
